<template>
  <div class="equipmentSoldDetail">
    <h4>设备领用</h4>
    <table class="table" border="1" rules="all">
      <tr>
        <td>领用单号</td>
        <td>{{detailForm.receiveCode}}</td>
        <td>领用时间</td>
        <td>{{detailForm.receiveDate}}</td>
      </tr>
      <tr>
        <td>领用人员</td>
        <td>{{detailForm.receiveUserName}}</td>
        <td>领用部门</td>
        <td>{{detailForm.receiveDeptName}}</td>
      </tr>
      <tr>
        <td>经手人</td>
        <td colspan="3">{{detailForm.receiveOperateUserName}}</td>
      </tr>
      <tr>
        <td>备注</td>
        <td colspan="3">{{detailForm.remark}}</td>
      </tr>
    </table>
    <h4>领用设备</h4>
    <el-table :data="detailForm.deviceParticularListVos" border>
      <el-table-column align="center" label="设备编号" prop="deviceCode"/>
      <el-table-column align="center" label="设备名称" prop="deviceName"/>
      <el-table-column align="center" label="类别" prop="deviceTypeName"/>
      <el-table-column align="center" label="品牌" prop="deviceBrandName"/>
      <el-table-column align="center" label="规格型号" prop="deviceModel"/>
<!--      <el-table-column align="center" label="状态"  prop="deviceStatusName"></el-table-column>-->
<!--      <el-table-column align="center" label="购置金额" prop="buyMoney"/>-->
      <el-table-column align="center" label="预计归还时间" prop="expectReturnDate"/>
      <el-table-column align="center" label="是否归还" prop="isReturn">
        <template slot-scope="scope">
          <template v-if="scope.row.isReturn==1">是</template>
          <template v-if="scope.row.isReturn==2">否</template>
        </template>
      </el-table-column>
      <el-table-column align="center" label="调入地点" prop="receiveSiteName"/>
      <el-table-column align="center" label="调出地点" prop="transferSiteName"/>
    </el-table>
  </div>
</template>
<script>
  import request from '@/utils/request'
    export default {
        name: "equipmentSoldDetail",
      data(){
          return{

            detailForm: {
              deviceParticularListVos:[]
            },
          }
      },
      created() {
          this.getdata()
      },
      methods: {
          //获取详情信息
          getdata:function () {
            request({
              url: '/device-receive-api/' + this.$route.query.data.id,
              method: 'get',
            }).then(response => {
              this.detailForm = response.data

            });
          },
      }
    }
</script>
<style scoped lang="scss">
  .equipmentSoldDetail {
    margin-left:20px;
    h4 {
      color: #05A380;
    }
    .status{
      color: white;
      width: 54px;
      height: 22px;
      display: inline-block;
      text-align: center;
    }
    .green{
      background: #78BF34;
    }
    .purple{
      background:#9E71DC
    }
    .red{
      background: red;
    }
    .table {
      width:900px;
      border: 1px solid #cccccc;
      color: #606266;
      font-size: inherit;
      .height {
        height: 120px;
      }
      tr {
        td:nth-child(2n-1) {
          width: 20%;
          text-align: center;
        }

        td:nth-child(2n) {
          width: 30%;
          padding-left: 10px;
        }

        td {
          line-height: 35px;

          .red {
            color: red;
          }
        }
      }
    }
  }
</style>
